<?
    trait PrincipioLab_TCollection
    {
        public static function fromArray(array $values = null) { throw new RuntimeException("Collection Error #1."); }

        public static function getLinkedList(PrincipioLab_IComparator $comparator = null) { return new PrincipioLab_LinkedList($comparator); }

        public static function makeCollection(array $values = null, PrincipioLab_IComparator $comparator = null)
        {
            $collection = static::getLinkedList($comparator);

            if (!is_null($values))
            {
                foreach ($values as $value)
                    $collection->addItem(static::fromArray($value));
            };

            return $collection;
        }
    }
?>